package com.guchenbo.study.mvc.servlet25.springmvc;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

/**
 * @Author guchenbo
 * @Date 2019/11/30.
 */
@Controller
public class StudyController {

    protected static final Logger log = LoggerFactory.getLogger(StudyController.class);

    @Resource
    private StudyService studyService;

    @RequestMapping(value = "/study")
    @ResponseBody
    public String ok(HttpServletResponse response) {
        log.info("in study controller");
        studyService.demo();
        return "Spring MVC Servlet 2.5 ok";
    }
}
